<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.icss.cooperative.model.basic.SynOfficial"%>

<!-- 引入标签库-->
<%@ include file="/pages/inc/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/pages/inc/header.jsp" %>
<title>收文登记单</title>
</head>
<body>
<style type="text/css">
	.liNote{
		list-style-type:none;margin: 0;
	}
	/* input:read-only {
            background-color: #f3f3ef;
    } */
</style>
<div style="width:100%;;margin: auto;padding: 0em 0;">
	<form id="docIssueForm">
		<input type="hidden" id="isStart" name="isStart" value="<c:out value='${isStart}'/>">
		<input type="hidden" id="formId" name="formId" value="<c:out value='${formId}'/>">
		<input type="hidden" id="docId" name="docId" value="<c:out value='${docIssue.docId}'/>">
		<input type="hidden" id="docReceiveType" name="docReceiveType" value="<c:out value='${docIssue.docReceiveType}'/>">
		<input type="hidden" id="displayNumberReceive" name="displayNumberReceive" value="<c:out value='${docIssue.displayNumberReceive}'/>">
		<input type="hidden" id="numberLogId" name="numberLogId" value="">	
		<input type="hidden" id="numberId" name="numberId" value="">			
		<input type="hidden" id="displayNumberYear" name="displayNumberYear" value="<c:out value='${numYear}'/>">
		<input type="hidden" id="keyword" name="keyword" value="<c:out value='${docIssue.keyword}'/>">
		<table id="docReceiveTable" class="inputTable">
			<caption style="text-align: center;"><c:out value='收文登记单' /></caption>
			<tr>
			<c:choose>
		       <c:when test="${docIssue.processId eq 'DOC_DispatchDeptReadFlow'}">
		              <td class="staticTdNW" style="width: 11%">编号</td>
		              <c:if test="${empty docIssue.displayNumberReceive}">
			              <td class="dynamicTdNW" colspan="5">
			              <input id="saveFlag" name="saveFlag" type="hidden"  value="2"/>
								<input type="hidden" id="docReceiveCode" name="docReceiveCode" value="部门收文">
								<input type="hidden" id="formType" name="formType" value="2" />
								<input id="numOrg"  disabled="disabled" class="easyui-textbox" type="text" value="<c:out value='${docIssue.receiveOrg}'/>"/>-<input id="numYear"  disabled="disabled" class="easyui-textbox" type="text" value="<c:out value='${numYear}'/>">
								-<input id="numMonth"  disabled="disabled" class="easyui-textbox" type="text" value="<c:out value='${numMonth}'/>">-<input id="num" name="num" disabled="disabled" class="easyui-textbox" type="text" value="">
						   </td>
		              </c:if>
		              <c:if test="${not empty docIssue.displayNumberReceive}">
		              <td class="dynamicTdNW" colspan="5">
				<input  disabled="disabled" class="easyui-textbox"  value="<c:out value='${docIssue.displayNumberReceive}'/>"/>
				</td>
		              </c:if>
				
				
		       </c:when>
		        <c:when test="${docIssue.processId eq 'DOC_TechnologyReceiveFlow'}">
		              <td class="staticTdNW" style="width: 11%">编号</td>
		                <c:if test="${empty docIssue.displayNumberReceive}">
		                <td class="dynamicTdNW" colspan="5">
		                <input id="saveFlag" name="saveFlag" type="hidden"  value="2"/>
				<input type="hidden" id="docReceiveCode" name="docReceiveCode" value="技术收文">
				<input type="hidden" id="formType" name="formType" value="3" />
				<select id="numLine" name="numLine" class="easyui-combobox" value="SQ" data-options="editable:false" style="width: 100px;">
						<option value="SQ">SQ</option>
						<option value="T1">T1</option>
						<option value="T2">T2</option>
						<option value="T3">T3</option>
						<option value="T4">T4</option>
						<option value="T5">T5</option>
						<option value="T6">T6</option>
						<option value="ZH">ZH</option>
						<option value="JN">JN</option>
						<option value="AN">AN</option>
						<option value="CH">CH</option>
					</select>-<select id="numLineName" name="numLineName" value="LXD" class="easyui-combobox"  data-options="editable:false" style="width: 100px;">
						<option value="LXD">LXD</option>
						<option value="SW">SW</option>
						<option value="JL">JL</option>
						<option value="CL">CL</option>
					</select>-
					<input id="numYear"  class="easyui-textbox"  disabled="disabled" type="text" value="<c:out value='${numYear}'/>"/>-<input id="num"  name="num" class="easyui-textbox" type="text" value="" >
				</td>
		                </c:if>
		                <c:if test="${not empty docIssue.displayNumberReceive}"><td class="dynamicTdNW" colspan="5">
				<input  disabled="disabled" class="easyui-textbox" type="text" value="<c:out value='${docIssue.displayNumberReceive}'/>"/>
				</td></c:if>
				
		       </c:when>
		       <c:otherwise>
		       <td class="staticTdNW" style="width: 11%">编号</td>
		       <c:if test="${empty docIssue.displayNumberReceive}">
		       				<td class="dynamicTdNW" colspan="3">
		       				<input id="saveFlag" name="saveFlag" type="hidden"  value="2"/>
				<input type="hidden" id="formType" name="formType" value="1">
					<input id="numYear"  class="easyui-textbox"  disabled="disabled" type="text" value="<c:out value='${numYear}'/>"/>-<input id="num" name="num"   class="easyui-textbox" type="text" value="">
				</td>
				<td class="staticTdNW" style="width: 11%">收文类型</td>
				<td class="dynamicTdNW" style="width: 21%">
					<select id="docReceiveCode" name="docReceiveCode" style="width: 70%;">
						<option value="办理类">办理类</option>
						<option value="阅知类">阅知类</option>
					</select>
				</td>	
		       </c:if>
		       <c:if test="${not empty docIssue.displayNumberReceive}">
		       <td class="dynamicTdNW" colspan="3">
					<input  disabled="disabled" class="easyui-textbox" type="text" value="<c:out value='${docIssue.displayNumberReceive}'/>"/>
				</td>
				<td class="staticTdNW" style="width: 11%">收文类型</td>
				<td class="dynamicTdNW" style="width: 22%">
					<select id="docReceiveCode" name="docReceiveCode" data-options="editable:false" style="width: 70%;">
						<option value="办理类" <c:if test='${"办理类" eq docIssue.docReceiveCode}'>selected="selected"</c:if> >办理类</option>
						<option value="阅知类" <c:if test='${"阅知类" eq docIssue.docReceiveCode}'>selected="selected"</c:if> >阅知类</option>
					</select>
				</td>	
		       </c:if>
				
		       </c:otherwise>
				</c:choose>
				</tr>
			<tr>
				<td class="staticTdNW" style="width: 11%">来文编号</td>
				<td class="dynamicTdNW" style="width: 22%">
					<input id="displayNumber" name="displayNumber" type="text" value="<c:out value='${docIssue.displayNumber}'/>"/>
				</td>
				<td class="staticTdNW" style="width: 11%">登记日期</td>
				<td class="dynamicTdNW" style="width: 22%">
					<input class="easyui-textbox" data-options="editable:false" type="text" value="<fmt:formatDate value="${docIssue.numberTime}" pattern="yyyy-MM-dd" />" />
				</td>
				<td class="staticTdNW" style="width: 11%">登记人</td>
				<td class="dynamicTdNW" style="width: 22%">
					<input id="drafter" name="drafter" class="easyui-textbox" data-options="editable:false" type="text" value="<c:out value='${docIssue.drafter}'/>" />
					<input readonly="readonly" id="drafterCode" name="drafterCode" type="hidden"  value="<c:out value='${docIssue.drafterCode}'/>"/>
					<input  id="draftOrg" name="draftOrg" type="hidden"  value="<c:out value='${docIssue.draftOrg}'/>"/>
					<input  id="draftOrgCode" name="draftOrgCode" type="hidden"  value="<c:out value='${docIssue.draftOrgCode}'/>"/>
					<input  id="receiveOrgCode" name="receiveOrgCode" type="hidden"  value="<c:out value='${docIssue.receiveOrgCode}'/>"/>
					<input  id="receiveOrg" name="receiveOrg" type="hidden"  value="<c:out value='${docIssue.receiveOrg}'/>"/>
				</td>				
			</tr>
			<tr>
				<!--
				<td class="staticTdNW" style="width: 11%">分办人</td>
				<td class="dynamicTdNW" style="width: 22%">
					<input id="pressCorrector" name="pressCorrector"  type="text"  value="<c:out value='${docIssue.pressCorrector}'/>"/>
				</td>
				-->
				<td class="staticTdNW">份<span class="spaceSpanHalf"></span>数</td>
				<td class="dynamicTdNW" >
					<input id="printNum" name="printNum" type="text" value="<c:out value='${docIssue.printNum}'/>" />
				</td>
				<td class="staticTdNW" style="width: 11%">紧急程度</td>
				<td class="dynamicTdNW" style="width: 22%">
					<select id="emergencyCode" name="emergencyCode"  data-options="editable:false" style="width: 70%;">
						<option value="普通" <c:if test='${"普通" eq docIssue.emergencyCode}'>selected="selected"</c:if>>普通</option>
						<option value="急" <c:if test='${"急" eq docIssue.emergencyCode}'>selected="selected"</c:if>>急</option>
						<option value="加急" <c:if test='${"加急" eq docIssue.emergencyCode}'>selected="selected"</c:if>>加急</option>
						<option value="特急" <c:if test='${"特急" eq docIssue.emergencyCode}'>selected="selected"</c:if>>特急</option>
					</select>
				</td>
				<td class="staticTdNW" style="width: 11%">密<span class="spaceSpan"></span>级</td>
				<td class="dynamicTdNW" style="width: 22%" >
					<select id="secretCode" name="secretCode"  class="easyui-combobox" data-options="editable:false" style="width: 70%;">
						<option value="">请选择</option>
						<option value="内部" <c:if test='${"内部" eq docIssue.secretCode}'>selected="selected"</c:if>>内部</option>
						<option value="秘密" <c:if test='${"秘密" eq docIssue.secretCode}'>selected="selected"</c:if>>秘密</option>
						<option value="机密" <c:if test='${"机密" eq docIssue.secretCode}'>selected="selected"</c:if>>机密</option>
						<option value="绝密" <c:if test='${"绝密" eq docIssue.secretCode}'>selected="selected"</c:if>>绝密</option>
					</select>
				</td>			
			</tr>
			<tr>
				<td class="staticTdNW" style="width: 11%">是否归档</td>
				<td class="dynamicTdNW" style="width: 22%">
					<select id="isArchive" name="isArchive" data-options="editable:false" style="width: 63%;">
						<!-- <option value="" >请选择</option> -->
						<option value="0">不归档</option>
						<option value="1">归档</option>
						
					</select>
				</td>
				
				<%-- <td class="staticTdNW" style="width: 11%">归档分类</td>
				<td class="dynamicTdNW"  style="width: 22%">
					<select id="archiveCategoryId" name="archiveCategoryId" style="width: 63%;">
						<option value="" >请选择</option>
						<c:forEach items="${docArchiveCategory }" var="item">
							<option value="${item.categoryId}" <c:if test='${item.categoryId eq docIssue.archiveCategoryId}'>selected="selected"</c:if> >${item.categoryName}</option>
						</c:forEach>
					</select>
					<input id="archiveCategoryName" name="archiveCategoryName" value="<c:out value='${docIssue.archiveCategoryName }' />" type="hidden">
				</td>
				
				<td class="staticTdNW">归档期限</td>
				<td class="dynamicTdNW">
					<select id="archiveSaveDeadline" class="easyui-combobox" name="archiveSaveDeadline" data-options="editable:false" style="width: 70%;">
						<option value="" >请选择</option>
						<option value="永久" <c:if test='${"永久" eq docIssue.archiveSaveDeadline}'>selected="selected"</c:if> >永久</option>
						<option value="30年" <c:if test='${"30年" eq docIssue.archiveSaveDeadline}'>selected="selected"</c:if> >30年</option>
						<option value="10年" <c:if test='${"10年" eq docIssue.archiveSaveDeadline}'>selected="selected"</c:if> >10年</option>
					</select>
				</td> --%>
				<td id="hide_" class="staticTdNW">办结时限</td>
				<td id="hide_expeireTime" class="dynamicTdNW" >
					<input id='expeireTime' name="expeireTime" class="easyui-datebox" editable="false" style="width: 70%;" value="<fmt:formatDate value="${docIssue.expeireTime}" pattern="yyyy-MM-dd" />">
				</td>
				<td colspan="4"></td>
			</tr>
			<%-- <tr>
				<td class="staticTdNW">办结时限</td>
				<td class="dynamicTdNW" >
					<input id='expeireTime' name="expeireTime" class="easyui-datebox" editable="false" style="width: 70%;" value="<fmt:formatDate value="${docIssue.expeireTime}" pattern="yyyy-MM-dd" />">
				</td>
				<td colspan="4"></td>
			</tr>	 --%>
			<tr>
				<td class="staticTdNW">来文单位</td>
				<td class="dynamicTdNW" colspan="5">
					<input id="dispatchOrg" name="dispatchOrg"  style="width: 85%;"  type="text" value="<c:out value='${docIssue.dispatchOrg}'/>" />
				</td>
			</tr>			
			<tr>
				<td class="staticTdNW">来文标题</td>
				<td class="dynamicTdNW" colspan="5">
					<input id="docName" name="docName"  style="width: 85%;"  type="text" value="<c:out value='${docIssue.docName}'/>" />
				</td>
			</tr>
			<%-- <tr>
				<td class="staticTdNW staticTd13">拟办意见</td>
				<td colspan="5" style="border: none;width: 100%;padding: 0;margin: 0;">
					<table cellpadding="0" cellspacing="0" style="border: none;width: 100%;padding: 0;margin: 0;">
						<tr>
							<td class="dynamicTdNW" style="width:40% ">
								<div style="height: 120px;overflow:auto;border:1px solid #D8D8D8;width:300px;">
										<ul  style="margin: 5px 0;">
											<c:forEach items="${officeAuditNote}" var="note">
												<li class="liNote">${note.docNoteContent}</li>										
												<li class="liNote"><span class="spaceSpan"></span>${note.personName }
												<span class="spaceSpan"></span><fmt:formatDate value="${note.noteTime}" pattern="yyyy-MM-dd HH:mm:ss" /></li>
											</c:forEach>										
										</ul>
									</div>
							</td>
							<td class="staticTdNW" style="width:10% ">批办意见</td>
							<td class="dynamicTdNW" style="width:40% ">
								<div style="height: 120px;overflow:auto;border:1px solid #D8D8D8;width:300px;">
									<ul style="margin: 5px 0;">
										<c:forEach items="${signNote }" var="note">
											<li class="liNote">${note.docNoteContent}</li>
											<li class="liNote"><span class="spaceSpan"></span>${note.personName }
											<span class="spaceSpan"></span><fmt:formatDate value="${note.noteTime}" pattern="yyyy-MM-dd HH:mm:ss" /></li>
										</c:forEach>
									</ul>
								</div>
							</td>
						<tr>
					</table>
				</td>
			</tr> --%>
			
			<tr id="receiveRemarkTR">
				<td class="staticTdNW">内容说明</td>
				<td class="dynamicTdNW" colspan="5">
								<textarea id="receiveRemark" name="receiveRemark" maxlength="85" style="width: 85%;height: 100px;" ><c:out value='${docIssue.receiveRemark}' /></textarea>
				</td>
			</tr>
			
			<tr id="showDocTr">
				<td class="staticTdNW">正&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;文</td>
				<td class="dynamicTdNW" colspan="5" id="OfficialTd">
					<a id="printWord" onclick="printOfficialWord()" class="easyui-linkbutton" plain="true" href="javascript:void(0)">查看正文</a>
					<a id="editWord" onclick="_openManuscriptWordWindow(false)" class="easyui-linkbutton" plain="true" href="javascript:void(0)">编辑正文</a>
					<a id="downloadWord" onclick="downloadOfficeFile()" class="easyui-linkbutton" plain="true" download="" href="javascript:void(0)">下载正文</a>
				</td>
			</tr>
			<tr>
				<td class="staticTdNW">附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件</td>
				<td class="dynamicTdNW" colspan="5">
		          	<%-- <div class="leftFloat">
		            	<ol id="fileUploadFileList" class="fileList">
		            		<c:forEach var="docFileList" items="${fileList}" varStatus="eachInfo">	            			
		            			<li class="oldFile" synAttachId="<c:out value='${docFileList.attachId}'/>">
		            				<c:out value='${docFileList.attachName}${docFileList.suffixName }' />
		            				<!--下载按钮  -->
		            				<a class="downloadAttach pointer attachImg" onclick="fileUploadDownloadDocAttach(this,'<c:out value="${docFileList.attachId }" />','<c:out value="${docFileList.suffixName }" />','<c:out value="${docFileList.attachName }" />')"></a>
		            			</li>
		            		</c:forEach>
		            	</ol>
			   	 	</div> --%>
			   	 	<div id="fileDiv"></div>
				</td>
			</tr>
			
		    <tr id="signDateShow" >
				<td class="staticTdNW staticTd13">会签时限</td>
				<td class="dynamicTdNW dynamicTd20" colspan="5">
				   <input id="signDate" class="easyui-textbox" name="signDate" style="width:20%" type="text" 
    				value="<fmt:formatDate value="${signDate}" pattern="yyyy-MM-dd" />" disabled="disabled"/>
				</td>
			</tr>
			
		</table>
	</form>
	<%@ include file="/pages/jsp/docIssue/correlationIssue.jsp" %>
	
	<div  id="receiveMain" class="main" style="width:940px;">
	<br>
		<table id="receiveAdviceTable" class="inputTable">
			<caption>来文意见</caption>
			<thead>
				<tr>
				   <th style="width: 35px;text-align:center;">
					序号
				   </th>
				   <th width="15%" style="text-align:center;">
				   	步骤
				   </th>
				   <th width="15%" style="text-align:center;">
				   	状态
				   </th>
				   <th>
				   	意见
				   </th>
				   <th width="15%" style="text-align:center;">
				   	办理人
				   </th>
				   <th width="20%" style="text-align:center;">
				   	收到/办结时间
				   </th>
				</tr> 
			</thead>
			<tbody id="receiveAdviceTbody">
			</tbody>	
		</table>
</div>
	<script type="text/javascript">
		<%@ include file="/pages/jsp/commom/validator.js" %>
		<%@ include file="/pages/jsp/docReceive/showDocReceive.js" %>
	</script>
</div>
</body>
</html>